<template>
<div class="op">
  <el-button type="primary" @click="oprate">
    <el-icon size="16">
      <i-ep-Edit />
    </el-icon>
<!--    实现父子组件之间的数据传递和交互-->
    <slot></slot>
  </el-button>
</div>
</template>
<script setup>
import {defineEmits} from 'vue'
const emit = defineEmits(['add'])
const oprate = () => {
  emit('add')
}
</script>
<style scoped>
.op{
  margin-top: 20px;
 font-weight: bold;
}
</style>